import request from '@/utils/request'

// 查询区县致死性差异性列表
export function modellistDifference(query) {
  return request({
    url: '/lethalityDifference/queryPutDataList',
    method: 'get',
    params: query
  })
}

// 查询区县致死性差异性详细
export function getModelDifference(id) {
  return request({
    url: '/lethalityDifference/getDataById?id=' + id,
    method: 'get'
  })
}

export function getModelDifferenceForCopy(id) {
  return request({
    url: '/lethalityDifference/getDataByIdForCopy?id=' + id,
    method: 'get'
  })
}


// 新增区县致死性差异性
export function addDifference(data) {
  return request({
    url: '/lethalityDifference/saveAndSubmit',
    method: 'post',
    data: data
  })
}

// 修改区县致死性差异性
export function updateModelDifference(data) {
  return request({
    url: '/lethalityDifference/addWeightValue',
    method: 'post',
    data: data
  })
}

// 删除区县致死性差异性
export function delDifference(id) {
  return request({
    url: '/lethalityDifference/deleteById/' + id,
    method: 'get'
  })
}

// 采纳区县致死性差异性
export function adoptDifference(id,isAdopt) {
  return request({
    url: '/lethalityDifference/updateIsAdopt',
    method: 'post',
    data:{
    	id:id,
    	isAdopt:isAdopt
    }
  })
}
